global gdt_flush

extern gdt_table_ptr

section .text
    gdt_flush:
        lgdt [gdt_table_ptr]
        jmp dword 0x0008:flush_gdt_far_jump
        flush_gdt_far_jump:
        mov ax, 0x10
        mov ds, ax
        mov es, ax
        mov fs, ax
        mov gs, ax
        mov ss, ax
        ret
